<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":-1,"unescape":false,"preload":true},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"./public/search.xml"};
  </script>

  <meta name="description" content="记录下这学期java实训（懒得保存了，干脆写成文章） 文章原址 文件百度云链接：https:&#x2F;&#x2F;pan.baidu.com&#x2F;s&#x2F;1Tm2diXuhxDx6C7rCOJ0ARA提取码：eada  里面有源码工程文件和相关工具mysql8.0官网下载">
<meta property="og:type" content="article">
<meta property="og:title" content="Java实训项目(大一下)">
<meta property="og:url" content="http://yoursite.com/2020/07/11/Java%E5%AE%9E%E8%AE%AD%E9%A1%B9%E7%9B%AE(%E5%A4%A7%E4%B8%80%E4%B8%8B)/index.html">
<meta property="og:site_name" content="GipBaby270&#39;s Blog">
<meta property="og:description" content="记录下这学期java实训（懒得保存了，干脆写成文章） 文章原址 文件百度云链接：https:&#x2F;&#x2F;pan.baidu.com&#x2F;s&#x2F;1Tm2diXuhxDx6C7rCOJ0ARA提取码：eada  里面有源码工程文件和相关工具mysql8.0官网下载">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-07-11T07:31:40.075Z">
<meta property="article:modified_time" content="2020-07-11T07:31:40.195Z">
<meta property="article:author" content="Gip886">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://yoursite.com/2020/07/11/Java%E5%AE%9E%E8%AE%AD%E9%A1%B9%E7%9B%AE(%E5%A4%A7%E4%B8%80%E4%B8%8B)/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Java实训项目(大一下) | GipBaby270's Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    
    <a href="https://github.com/Gip886" target="_blank" rel="noopener" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#64CEAA; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">GipBaby270's Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Fighting for BAT!</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/07/11/Java%E5%AE%9E%E8%AE%AD%E9%A1%B9%E7%9B%AE(%E5%A4%A7%E4%B8%80%E4%B8%8B)/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/%E5%A4%B4%E5%83%8F.jpg">
      <meta itemprop="name" content="Gip886">
      <meta itemprop="description" content="为了更美好的明天而战">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="GipBaby270's Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Java实训项目(大一下)
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-07-11 15:31:40" itemprop="dateCreated datePublished" datetime="2020-07-11T15:31:40+08:00">2020-07-11</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Java/" itemprop="url" rel="index"><span itemprop="name">Java</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span><br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>34k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>31 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>记录下这学期java实训（懒得保存了，干脆写成文章）</p>
<p><a href="https://www.jianshu.com/p/e759234e852c" target="_blank" rel="noopener">文章原址</a></p>
<p>文件百度云链接：<a href="https://pan.baidu.com/s/1Tm2diXuhxDx6C7rCOJ0ARA" target="_blank" rel="noopener">https://pan.baidu.com/s/1Tm2diXuhxDx6C7rCOJ0ARA</a><br>提取码：eada </p>
<p>里面有源码工程文件和相关工具<br>mysql8.0官网下载</p>
<a id="more"></a>

<hr>
<p>主窗口</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br></pre></td><td class="code"><pre><span class="line">package 学籍管理系统视窗;</span><br><span class="line"></span><br><span class="line">import java.awt.BorderLayout;</span><br><span class="line">import java.awt.EventQueue;</span><br><span class="line"></span><br><span class="line">import javax.swing.JFrame;</span><br><span class="line">import javax.swing.JPanel;</span><br><span class="line">import javax.swing.border.EmptyBorder;</span><br><span class="line">import java.awt.CardLayout;</span><br><span class="line">import java.awt.Toolkit;</span><br><span class="line">import javax.swing.JMenuBar;</span><br><span class="line">import javax.swing.JMenu;</span><br><span class="line">import javax.swing.JMenuItem;</span><br><span class="line">import java.awt.event.MouseAdapter;</span><br><span class="line">import java.awt.event.MouseEvent;</span><br><span class="line">import java.sql.SQLException;</span><br><span class="line"></span><br><span class="line">import javax.swing.JButton;</span><br><span class="line">import java.awt.event.ActionListener;</span><br><span class="line">import java.awt.event.ActionEvent;</span><br><span class="line">import javax.swing.SwingConstants;</span><br><span class="line">import javax.swing.ImageIcon;</span><br><span class="line">import javax.swing.KeyStroke;</span><br><span class="line">import java.awt.event.KeyEvent;</span><br><span class="line">import java.awt.event.InputEvent;</span><br><span class="line"></span><br><span class="line">public class 主窗口 extends JFrame &#123;</span><br><span class="line">	</span><br><span class="line"></span><br><span class="line">	private JPanel contentPane;</span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Launch the application.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public static void main(String[] args) &#123;</span><br><span class="line">		EventQueue.invokeLater(new Runnable() &#123;</span><br><span class="line">			public void run() &#123;</span><br><span class="line">				try &#123;</span><br><span class="line">					主窗口 frame &#x3D; new 主窗口();</span><br><span class="line">					frame.setVisible(true);</span><br><span class="line">				&#125; catch (Exception e) &#123;</span><br><span class="line">					e.printStackTrace();</span><br><span class="line">				&#125;</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Create the frame.</span><br><span class="line">	 * @throws SQLException </span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public 主窗口() throws SQLException &#123;</span><br><span class="line">		&#x2F;&#x2F;this.setLocationRelativeTo(null);</span><br><span class="line">		setBounds(100, 100, 800, 500);</span><br><span class="line">		this.setLocationRelativeTo(null);</span><br><span class="line">		contentPane &#x3D; new JPanel();</span><br><span class="line">		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));</span><br><span class="line">		setContentPane(contentPane);</span><br><span class="line">		CardLayout card&#x3D;new CardLayout();</span><br><span class="line">		contentPane.setLayout(card);</span><br><span class="line">		欢迎面板 欢迎面板&#x3D;new 欢迎面板();</span><br><span class="line">		contentPane.add(&quot;0&quot;,欢迎面板);</span><br><span class="line">		修改面板 修改面板&#x3D;new 修改面板();</span><br><span class="line">		contentPane.add(&quot;2&quot;,修改面板);</span><br><span class="line">		录入面板 录入面板&#x3D;new 录入面板();</span><br><span class="line">		contentPane.add(&quot;1&quot;,录入面板);</span><br><span class="line">		删除面板 删除面板&#x3D;new 删除面板();</span><br><span class="line">		contentPane.add(&quot;3&quot;,删除面板);</span><br><span class="line">		查询面板  查询面板&#x3D;new 查询面板();</span><br><span class="line">		contentPane.add(&quot;4&quot;,查询面板);</span><br><span class="line">		查看面板  查看面板&#x3D;new 查看面板();</span><br><span class="line">		contentPane.add(&quot;5&quot;,查看面板);</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		setTitle(&quot;\u5E7F\u5DDE\u822A\u6D77\u5B66\u9662\u5B66\u751F\u7BA1\u7406\u7CFB\u7EDF&quot;);</span><br><span class="line">		setIconImage(Toolkit.getDefaultToolkit().getImage(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\668eca61e8886291e5af08b33983448e.jpg&quot;));</span><br><span class="line">		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		JMenuBar menuBar &#x3D; new JMenuBar();</span><br><span class="line">		setJMenuBar(menuBar);</span><br><span class="line">		</span><br><span class="line">		JMenu menu &#x3D; new JMenu(&quot;\u64CD\u4F5C\u83DC\u5355&quot;);</span><br><span class="line">		menu.setIcon(new ImageIcon(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\\u622A\u56FE20190624192426.png&quot;));</span><br><span class="line">		</span><br><span class="line">		menuBar.add(menu);</span><br><span class="line">		</span><br><span class="line">		JMenuItem menuItem &#x3D; new JMenuItem(&quot;\u5F55\u5165\u5B66\u751F\u4FE1\u606F&quot;);</span><br><span class="line">		menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, InputEvent.ALT_MASK));</span><br><span class="line">		menuItem.setIcon(new ImageIcon(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\\u622A\u56FE20190624192512.png&quot;));</span><br><span class="line">		menuItem.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				card.show(contentPane, &quot;1&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		</span><br><span class="line">		menu.add(menuItem);</span><br><span class="line">		</span><br><span class="line">		JMenuItem menuItem_1 &#x3D; new JMenuItem(&quot;\u4FEE\u6539\u5B66\u751F\u4FE1\u606F&quot;);</span><br><span class="line">		menuItem_1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.ALT_MASK));</span><br><span class="line">		menuItem_1.setIcon(new ImageIcon(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\\u622A\u56FE20190624192548.png&quot;));</span><br><span class="line">		menuItem_1.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				card.show(contentPane, &quot;2&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		</span><br><span class="line">		menu.add(menuItem_1);</span><br><span class="line">		</span><br><span class="line">		JMenuItem menuItem_2 &#x3D; new JMenuItem(&quot;\u5220\u9664\u5B66\u751F\u4FE1\u606F&quot;);</span><br><span class="line">		menuItem_2.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_MASK));</span><br><span class="line">		menuItem_2.setIcon(new ImageIcon(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\\u622A\u56FE20190624192731.png&quot;));</span><br><span class="line">		menuItem_2.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				card.show(contentPane, &quot;3&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		menu.add(menuItem_2);</span><br><span class="line">		</span><br><span class="line">		JMenuItem menuItem_3 &#x3D; new JMenuItem(&quot;\u67E5\u8BE2\u5B66\u751F\u4FE1\u606F&quot;);</span><br><span class="line">		menuItem_3.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.ALT_MASK));</span><br><span class="line">		menuItem_3.setIcon(new ImageIcon(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\\u622A\u56FE20190624192757.png&quot;));</span><br><span class="line">		menuItem_3.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				card.show(contentPane, &quot;4&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		menu.add(menuItem_3);</span><br><span class="line">		</span><br><span class="line">		JMenuItem menuItem_4 &#x3D; new JMenuItem(&quot;\u663E\u793A\u6240\u6709\u4FE1\u606F&quot;);</span><br><span class="line">		menuItem_4.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.ALT_MASK));</span><br><span class="line">		menuItem_4.setIcon(new ImageIcon(&quot;E:\\eclipse64\u4F4D\\workplace\\\u5B66\u7C4D\u7BA1\u7406\u7CFB\u7EDF\u89C6\u7A97\\image\\\u622A\u56FE20190624192820.png&quot;));</span><br><span class="line">		menuItem_4.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				card.show(contentPane, &quot;5&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		menu.add(menuItem_4);</span><br><span class="line">	</span><br><span class="line">		</span><br><span class="line">	</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<p>欢迎面板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">package 学籍管理系统视窗;</span><br><span class="line"></span><br><span class="line">import javax.swing.JPanel;</span><br><span class="line">import javax.swing.JTextArea;</span><br><span class="line">import javax.swing.JLabel;</span><br><span class="line">import java.awt.Color;</span><br><span class="line">import java.awt.Font;</span><br><span class="line"></span><br><span class="line">public class 欢迎面板 extends JPanel &#123;</span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Create the panel.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public 欢迎面板() &#123;</span><br><span class="line">		setBackground(Color.CYAN);</span><br><span class="line">		setLayout(null);</span><br><span class="line">		</span><br><span class="line">		JLabel lblNewLabel &#x3D; new JLabel(&quot;\u6B22\u8FCE\u4F7F\u7528\u5E7F\u5DDE\u822A\u6D77\u5B66\u9662\u5B66\u751F\u7BA1\u7406\u7CFB\u7EDF&quot;);</span><br><span class="line">		lblNewLabel.setFont(new Font(&quot;宋体&quot;, Font.PLAIN, 24));</span><br><span class="line">		lblNewLabel.setBounds(34, 90, 387, 62);</span><br><span class="line">		add(lblNewLabel);</span><br><span class="line">		</span><br><span class="line">		JLabel label &#x3D; new JLabel(&quot;\u8BF7\u4F60\u6309\u5DE6\u4E0A\u89D2\u83DC\u5355\u680F\u63D0\u793A\u64CD\u4F5C&quot;);</span><br><span class="line">		label.setBounds(100, 178, 233, 18);</span><br><span class="line">		add(label);</span><br><span class="line">		</span><br><span class="line"></span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<p>录入面板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br></pre></td><td class="code"><pre><span class="line">package 学籍管理系统视窗;</span><br><span class="line"></span><br><span class="line">import java.awt.event.ItemEvent;</span><br><span class="line">import java.awt.event.ItemListener;</span><br><span class="line">import java.awt.event.MouseAdapter;</span><br><span class="line">import java.awt.event.MouseEvent;</span><br><span class="line">import java.sql.Connection;</span><br><span class="line">import java.sql.SQLException;</span><br><span class="line"></span><br><span class="line">import javax.swing.ButtonGroup;</span><br><span class="line">import javax.swing.ComboBoxModel;</span><br><span class="line">import javax.swing.DefaultComboBoxModel;</span><br><span class="line">import javax.swing.JButton;</span><br><span class="line">import javax.swing.JComboBox;</span><br><span class="line">import javax.swing.JLabel;</span><br><span class="line">import javax.swing.JOptionPane;</span><br><span class="line">import javax.swing.JPanel;</span><br><span class="line">import javax.swing.JRadioButton;</span><br><span class="line">import javax.swing.JTextField;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">import 数据库.Test;</span><br><span class="line"></span><br><span class="line">import java.awt.event.ActionListener;</span><br><span class="line">import java.awt.event.ActionEvent;</span><br><span class="line"></span><br><span class="line">public class 录入面板 extends JPanel &#123;</span><br><span class="line">	private JTextField textField;</span><br><span class="line">	private JTextField textField_1;</span><br><span class="line">	private JTextField textField_2;</span><br><span class="line">	</span><br><span class="line">	private JLabel lblNewLabel;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Create the panel.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public 录入面板() &#123;</span><br><span class="line">		setLayout(null);</span><br><span class="line">		 lblNewLabel &#x3D; new JLabel(&quot;\u5B66\u53F7&quot;);</span><br><span class="line">		lblNewLabel.setBounds(72, 55, 30, 18);</span><br><span class="line">		add(lblNewLabel);</span><br><span class="line">		</span><br><span class="line">		JLabel label &#x3D; new JLabel(&quot;\u59D3\u540D&quot;);</span><br><span class="line">		label.setBounds(72, 24, 30, 18);</span><br><span class="line">		add(label);</span><br><span class="line">		</span><br><span class="line">		textField &#x3D; new JTextField(&quot;请输入学号&quot;);</span><br><span class="line">		textField.setBounds(116, 52, 130, 24);</span><br><span class="line">		textField.addMouseListener(new MouseAdapter() &#123;</span><br><span class="line">			@Override</span><br><span class="line">			public void mouseClicked(MouseEvent e) &#123;</span><br><span class="line">				textField.setText(&quot;&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		add(textField);</span><br><span class="line">		textField.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		textField_1 &#x3D; new JTextField(&quot;请输入姓名&quot;);</span><br><span class="line">		textField_1.setBounds(116, 21, 130, 24);</span><br><span class="line">		textField_1.addMouseListener(new MouseAdapter() &#123;</span><br><span class="line">			@Override</span><br><span class="line">			public void mouseClicked(MouseEvent e) &#123;</span><br><span class="line">				textField_1.setText(&quot;&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		add(textField_1);</span><br><span class="line">		textField_1.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_1 &#x3D; new JLabel(&quot;\u6027\u522B&quot;);</span><br><span class="line">		label_1.setBounds(72, 89, 30, 18);</span><br><span class="line">	add(label_1);</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		JRadioButton radioButton &#x3D; new JRadioButton(&quot;\u7537&quot;);</span><br><span class="line">		radioButton.setBounds(126, 85, 43, 27);</span><br><span class="line">		add(radioButton);</span><br><span class="line">		</span><br><span class="line">		JRadioButton radioButton_1 &#x3D; new JRadioButton(&quot;\u5973&quot;);</span><br><span class="line">		radioButton_1.setBounds(175, 85, 55, 27);</span><br><span class="line">		add(radioButton_1);</span><br><span class="line">		</span><br><span class="line">		&#x2F;&#x2F;创建ButtonGroup对象</span><br><span class="line">				ButtonGroup btgSex &#x3D; new ButtonGroup();</span><br><span class="line">				btgSex.add(radioButton);</span><br><span class="line">				btgSex.add(radioButton_1);</span><br><span class="line">		</span><br><span class="line">		JLabel label_2 &#x3D; new JLabel(&quot;\u5B66\u9662&quot;);</span><br><span class="line">		label_2.setBounds(72, 120, 30, 18);</span><br><span class="line">		add(label_2);</span><br><span class="line">		</span><br><span class="line">		ComboBoxModel aModel1&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;航海技术&quot;,&quot;航海技术1&quot;,&quot;航海技术2&quot;&#125;);</span><br><span class="line">		 ComboBoxModel aModel2&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;轮机工程学&quot;,&quot;轮机工程学1&quot;,&quot;轮机工程学2&quot;&#125;);</span><br><span class="line">		 ComboBoxModel aModel3&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;计算机科学与技术&quot;,&quot;电子商务（本科）&quot;,&quot;软件技术&quot;,&quot;计算机应用技术&quot;,&quot;电子商务&quot;&#125;);</span><br><span class="line">		 ComboBoxModel aModel4&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;英语&quot;,&quot;日语&quot;,&quot;外语学&quot;&#125;);</span><br><span class="line">			JComboBox comboBox_1 &#x3D; new JComboBox();</span><br><span class="line">			comboBox_1.setBounds(110, 151, 168, 24);</span><br><span class="line">			comboBox_1.setToolTipText(&quot;&quot;);</span><br><span class="line">			add(comboBox_1);</span><br><span class="line">			</span><br><span class="line">			</span><br><span class="line">		 JComboBox comboBox &#x3D; new JComboBox();</span><br><span class="line">		 comboBox.setBounds(110, 117, 164, 24);</span><br><span class="line">		comboBox.addItemListener(new ItemListener() &#123;</span><br><span class="line">			public void itemStateChanged(ItemEvent e) &#123;</span><br><span class="line">				if(e.getStateChange()&#x3D;&#x3D;ItemEvent.SELECTED)</span><br><span class="line">			    &#123;</span><br><span class="line">			     int a&#x3D;comboBox.getSelectedIndex();</span><br><span class="line">			     if(a&#x3D;&#x3D;0)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel1);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			     </span><br><span class="line">			     &#125;</span><br><span class="line">			     else if(a&#x3D;&#x3D;1)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel2);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			      </span><br><span class="line">			     &#125;</span><br><span class="line">			     else if(a&#x3D;&#x3D;2)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel3);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			     &#125;</span><br><span class="line">			     else if(a&#x3D;&#x3D;3)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel4);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			     &#125;</span><br><span class="line">			     </span><br><span class="line">			    &#125;</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		comboBox.setModel(new DefaultComboBoxModel(new String[] &#123;&quot;海运学院&quot;, &quot;轮机工程学院&quot;, &quot;信息与通信工程学院&quot;, &quot;外语学院&quot;&#125;));</span><br><span class="line">		comboBox.setSelectedIndex(-1);</span><br><span class="line">		add(comboBox);</span><br><span class="line">		</span><br><span class="line">		JButton button &#x3D; new JButton(&quot;\u5F55\u5165&quot;);</span><br><span class="line">		button.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				String sex&#x3D;&quot;&quot;;</span><br><span class="line">				if(radioButton.isSelected()) &#123;</span><br><span class="line">					sex&#x3D;radioButton.getText();</span><br><span class="line">				&#125;else &#123;</span><br><span class="line">					sex&#x3D;radioButton_1.getText();</span><br><span class="line">				&#125;</span><br><span class="line">			</span><br><span class="line">				if(textField_1.getText().equals(&quot;&quot;)||textField_1.getText().equals(&quot;请输入姓名&quot;)) &#123;</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;请输入姓名&quot;,&quot;错误&quot;,JOptionPane.ERROR_MESSAGE);</span><br><span class="line">					return;</span><br><span class="line">				&#125;</span><br><span class="line">				</span><br><span class="line">				if(textField.getText().equals(&quot;&quot;)||textField.getText().equals(&quot;请输入学号&quot;)) &#123;</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;请输入学号&quot;,&quot;错误&quot;,JOptionPane.ERROR_MESSAGE);</span><br><span class="line">					return;</span><br><span class="line">				&#125;</span><br><span class="line">				</span><br><span class="line">				if(comboBox.getSelectedIndex()&#x3D;&#x3D;-1) &#123;</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;请选择学院&quot;,&quot;错误&quot;,JOptionPane.ERROR_MESSAGE);</span><br><span class="line">					return;</span><br><span class="line">				&#125;</span><br><span class="line">				if(comboBox_1.getSelectedIndex()&#x3D;&#x3D;-1) &#123;</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;请选择专业&quot;,&quot;错误&quot;,JOptionPane.ERROR_MESSAGE);</span><br><span class="line">					return;</span><br><span class="line">				&#125;</span><br><span class="line">				</span><br><span class="line">				if(textField_2.getText().equals(&quot;&quot;)) &#123;</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;请输入班级&quot;,&quot;错误&quot;,JOptionPane.ERROR_MESSAGE);</span><br><span class="line">					return;</span><br><span class="line">				&#125;</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">				&#x2F;&#x2F;保存数据</span><br><span class="line">				String sno&#x3D;textField.getText();</span><br><span class="line">				String name&#x3D;textField_1.getText();</span><br><span class="line">				String ssex;</span><br><span class="line">				if(radioButton.isSelected()) &#123;</span><br><span class="line">					 ssex&#x3D;&quot;男&quot;;</span><br><span class="line">				&#125;else</span><br><span class="line">					 ssex&#x3D;&quot;女&quot;;</span><br><span class="line">				</span><br><span class="line">				String department&#x3D;comboBox.getSelectedItem().toString();</span><br><span class="line">				String major&#x3D;comboBox_1.getSelectedItem().toString();</span><br><span class="line">				String myclass&#x3D;textField_2.getText();</span><br><span class="line">				&#x2F;&#x2F;调用自己链接数据库操作方法test</span><br><span class="line">				Connection sin&#x3D;Test.getconnectin();</span><br><span class="line">				boolean flag;</span><br><span class="line">				flag&#x3D;Test.chongfu(sin,sno);</span><br><span class="line">				System.out.println(flag);</span><br><span class="line">				if(flag&#x3D;&#x3D;false) &#123;</span><br><span class="line">				Object str[]&#x3D;&#123;sno,name,ssex,department,major,myclass&#125;;</span><br><span class="line">				</span><br><span class="line">				Test.insert(sin, str);</span><br><span class="line">				JOptionPane.showMessageDialog(null,&quot;录入成功&quot;,&quot;提示&quot;,JOptionPane.INFORMATION_MESSAGE);</span><br><span class="line">				radioButton.setSelected(false);</span><br><span class="line">				radioButton_1.setSelected(false);</span><br><span class="line">				textField.setText(&quot;请输入学号&quot;);</span><br><span class="line">				textField_1.setText(&quot;请输入姓名&quot;);</span><br><span class="line">				textField_2.setText(&quot;&quot;);</span><br><span class="line">				comboBox.setSelectedIndex(-1);</span><br><span class="line">				comboBox_1.setSelectedIndex(-1);</span><br><span class="line">				&#125;</span><br><span class="line">				else</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;失败，学号重复&quot;,&quot;提示&quot;,JOptionPane.INFORMATION_MESSAGE);</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">			</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		button.setBounds(203, 232, 63, 27);</span><br><span class="line">		add(button);</span><br><span class="line">		</span><br><span class="line">		JButton button_1 &#x3D; new JButton(&quot;\u91CD\u7F6E&quot;);</span><br><span class="line">		button_1.addMouseListener(new MouseAdapter() &#123;</span><br><span class="line">			@Override</span><br><span class="line">			public void mouseClicked(MouseEvent e) &#123;</span><br><span class="line">				radioButton.setSelected(false);</span><br><span class="line">				radioButton_1.setSelected(false);</span><br><span class="line">				textField.setText(&quot;请输入学号&quot;);</span><br><span class="line">				textField_1.setText(&quot;请输入姓名&quot;);</span><br><span class="line">				textField_2.setText(&quot;&quot;);</span><br><span class="line">				comboBox.setSelectedIndex(-1);</span><br><span class="line">				comboBox_1.setSelectedIndex(-1);</span><br><span class="line">				JOptionPane.showMessageDialog(null,&quot;重置成功&quot;,&quot;提示&quot;,JOptionPane.INFORMATION_MESSAGE);</span><br><span class="line">			</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		button_1.setBounds(106, 232, 63, 27);</span><br><span class="line">		add(button_1);</span><br><span class="line">		</span><br><span class="line">		JLabel label_3 &#x3D; new JLabel(&quot;\u4E13\u4E1A&quot;);</span><br><span class="line">		label_3.setBounds(72, 154, 30, 18);</span><br><span class="line">		add(label_3);</span><br><span class="line">		</span><br><span class="line">		JLabel label_4 &#x3D; new JLabel(&quot;\u73ED\u7EA7&quot;);</span><br><span class="line">		label_4.setBounds(72, 191, 30, 18);</span><br><span class="line">		add(label_4);</span><br><span class="line">		</span><br><span class="line">		textField_2 &#x3D; new JTextField();</span><br><span class="line">		textField_2.setBounds(110, 188, 164, 24);</span><br><span class="line">		add(textField_2);</span><br><span class="line">		textField_2.setColumns(10);</span><br><span class="line">		</span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">	&#125;</span><br></pre></td></tr></table></figure>
<hr>
<p>修改面板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br></pre></td><td class="code"><pre><span class="line">package 学籍管理系统视窗;</span><br><span class="line"></span><br><span class="line">import javax.swing.JPanel;</span><br><span class="line">import javax.swing.JLabel;</span><br><span class="line">import javax.swing.JOptionPane;</span><br><span class="line"></span><br><span class="line">import java.awt.Font;</span><br><span class="line">import java.awt.event.ItemEvent;</span><br><span class="line">import java.awt.event.ItemListener;</span><br><span class="line">import java.sql.Connection;</span><br><span class="line">import java.sql.PreparedStatement;</span><br><span class="line">import java.sql.ResultSet;</span><br><span class="line">import java.sql.SQLException;</span><br><span class="line"></span><br><span class="line">import javax.swing.JTextField;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">import 数据库.Test;</span><br><span class="line"></span><br><span class="line">import javax.swing.ButtonGroup;</span><br><span class="line">import javax.swing.ComboBoxModel;</span><br><span class="line">import javax.swing.DefaultComboBoxModel;</span><br><span class="line">import javax.swing.JButton;</span><br><span class="line">import javax.swing.JComboBox;</span><br><span class="line">import javax.swing.JRadioButton;</span><br><span class="line">import java.awt.event.ActionListener;</span><br><span class="line">import java.awt.event.ActionEvent;</span><br><span class="line"></span><br><span class="line">public class 修改面板 extends JPanel &#123;</span><br><span class="line">	</span><br><span class="line">	private JTextField textField;</span><br><span class="line">	private JTextField textField_1;</span><br><span class="line">	private JTextField textField_2;</span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Create the panel.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public 修改面板() &#123;</span><br><span class="line">		setLayout(null);</span><br><span class="line">		</span><br><span class="line">		JLabel label &#x3D; new JLabel(&quot;\u8F93\u5165\u8981\u4FEE\u6539\u4FE1\u606F\u7684\u5B66\u53F7\uFF1A&quot;);</span><br><span class="line">		label.setFont(new Font(&quot;宋体&quot;, Font.PLAIN, 16));</span><br><span class="line">		label.setBounds(42, 18, 177, 18);</span><br><span class="line">		add(label);</span><br><span class="line">		</span><br><span class="line">		textField &#x3D; new JTextField();</span><br><span class="line">		textField.setBounds(213, 15, 144, 24);</span><br><span class="line">		add(textField);</span><br><span class="line">		textField.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		JLabel label_1 &#x3D; new JLabel(&quot;\uFF08\u65B0\uFF09\u59D3\u540D\uFF1A&quot;);</span><br><span class="line">		label_1.setBounds(42, 76, 120, 18);</span><br><span class="line">		add(label_1);</span><br><span class="line">		</span><br><span class="line">		textField_1 &#x3D; new JTextField();</span><br><span class="line">		textField_1.setBounds(133, 73, 120, 24);</span><br><span class="line">		add(textField_1);</span><br><span class="line">		textField_1.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JRadioButton radioButton &#x3D; new JRadioButton(&quot;\u7537&quot;);</span><br><span class="line">		radioButton.setBounds(107, 119, 51, 27);</span><br><span class="line">		add(radioButton);</span><br><span class="line">		</span><br><span class="line">		JRadioButton radioButton_1 &#x3D; new JRadioButton(&quot;\u5973&quot;);</span><br><span class="line">		radioButton_1.setBounds(168, 119, 51, 27);</span><br><span class="line">		add(radioButton_1);</span><br><span class="line">		ButtonGroup btgSex &#x3D; new ButtonGroup();</span><br><span class="line">		btgSex.add(radioButton);</span><br><span class="line">		btgSex.add(radioButton_1);</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		ComboBoxModel aModel1&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;航海技术&quot;,&quot;航海技术1&quot;,&quot;航海技术2&quot;&#125;);</span><br><span class="line">		 ComboBoxModel aModel2&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;轮机工程学&quot;,&quot;轮机工程学1&quot;,&quot;轮机工程学2&quot;&#125;);</span><br><span class="line">		 ComboBoxModel aModel3&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;计算机科学与技术&quot;,&quot;电子商务（本科）&quot;,&quot;软件技术&quot;,&quot;计算机应用技术&quot;,&quot;电子商务&quot;&#125;);</span><br><span class="line">		 ComboBoxModel aModel4&#x3D;new  DefaultComboBoxModel(new String[]&#123;&quot;英语&quot;,&quot;日语&quot;,&quot;外语学&quot;&#125;);</span><br><span class="line">			JComboBox comboBox_1 &#x3D; new JComboBox();</span><br><span class="line">			comboBox_1.setToolTipText(&quot;&quot;);</span><br><span class="line">			comboBox_1.setBounds(133, 207, 185, 24);</span><br><span class="line">			this.add(comboBox_1);</span><br><span class="line">			</span><br><span class="line">			</span><br><span class="line">		 JComboBox comboBox &#x3D; new JComboBox();</span><br><span class="line">		comboBox.addItemListener(new ItemListener() &#123;</span><br><span class="line">			public void itemStateChanged(ItemEvent e) &#123;</span><br><span class="line">				if(e.getStateChange()&#x3D;&#x3D;ItemEvent.SELECTED)</span><br><span class="line">			    &#123;</span><br><span class="line">			     int a&#x3D;comboBox.getSelectedIndex();</span><br><span class="line">			     if(a&#x3D;&#x3D;0)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel1);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			     </span><br><span class="line">			     &#125;</span><br><span class="line">			     else if(a&#x3D;&#x3D;1)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel2);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			      </span><br><span class="line">			     &#125;</span><br><span class="line">			     else if(a&#x3D;&#x3D;2)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel3);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			     &#125;</span><br><span class="line">			     else if(a&#x3D;&#x3D;3)</span><br><span class="line">			     &#123;</span><br><span class="line">			    	 comboBox_1.setModel(aModel4);</span><br><span class="line">			    	 comboBox_1.setSelectedIndex(-1);</span><br><span class="line">			     &#125;</span><br><span class="line">			     </span><br><span class="line">			    &#125;</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		comboBox.setModel(new DefaultComboBoxModel(new String[] &#123;&quot;\u6D77\u8FD0\u5B66\u9662&quot;, &quot;\u8F6E\u673A\u5DE5\u7A0B\u5B66\u9662&quot;, &quot;\u4FE1\u606F\u4E0E\u901A\u4FE1\u5DE5\u7A0B\u5B66\u9662&quot;, &quot;\u5916\u8BED\u5B66\u9662&quot;&#125;));</span><br><span class="line">		comboBox.setSelectedIndex(-1);</span><br><span class="line">		comboBox.setBounds(133, 167, 182, 24);</span><br><span class="line">		this.add(comboBox);</span><br><span class="line">		</span><br><span class="line">		JLabel lblNewLabel &#x3D; new JLabel(&quot;\u65B0\u5B66\u9662\uFF1A&quot;);</span><br><span class="line">		lblNewLabel.setBounds(72, 169, 71, 18);</span><br><span class="line">		add(lblNewLabel);</span><br><span class="line">		</span><br><span class="line">		JLabel label_2 &#x3D; new JLabel(&quot;\u65B0\u4E13\u4E1A\uFF1A&quot;);</span><br><span class="line">		label_2.setBounds(70, 210, 72, 18);</span><br><span class="line">		add(label_2);</span><br><span class="line">		</span><br><span class="line">		JLabel label_3 &#x3D; new JLabel(&quot;\u65B0 \u73ED\u7EA7&quot;);</span><br><span class="line">		label_3.setBounds(72, 247, 72, 18);</span><br><span class="line">		add(label_3);</span><br><span class="line">		</span><br><span class="line">		textField_2 &#x3D; new JTextField();</span><br><span class="line">		textField_2.setBounds(133, 244, 185, 24);</span><br><span class="line">		add(textField_2);</span><br><span class="line">		textField_2.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JButton button &#x3D; new JButton(&quot;\u4FEE\u6539&quot;);</span><br><span class="line">		button.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">				String sno&#x3D;textField.getText();</span><br><span class="line">				String name&#x3D;textField_1.getText();</span><br><span class="line">				String ssex;</span><br><span class="line">				if(radioButton.isSelected()) &#123;</span><br><span class="line">					 ssex&#x3D;&quot;男&quot;;</span><br><span class="line">				&#125;else</span><br><span class="line">					 ssex&#x3D;&quot;女&quot;;</span><br><span class="line">				</span><br><span class="line">				String department&#x3D;comboBox.getSelectedItem().toString();</span><br><span class="line">				String major&#x3D;comboBox_1.getSelectedItem().toString();</span><br><span class="line">				String myclass&#x3D;textField_2.getText();</span><br><span class="line">				&#x2F;&#x2F;调用自己链接数据库操作方法test</span><br><span class="line">				Object str[]&#x3D;&#123;sno,name,ssex,department,major,myclass&#125;;</span><br><span class="line">				Connection sin&#x3D;Test.getconnectin();</span><br><span class="line">				Test.update(sin, str);</span><br><span class="line">				radioButton.setSelected(false);</span><br><span class="line">				radioButton_1.setSelected(false);</span><br><span class="line">				textField.setText(&quot;&quot;);</span><br><span class="line">				textField_1.setText(&quot;&quot;);</span><br><span class="line">				textField_2.setText(&quot;&quot;);</span><br><span class="line">				comboBox.setSelectedIndex(-1);</span><br><span class="line">				comboBox_1.setSelectedIndex(-1);</span><br><span class="line">				JOptionPane.showMessageDialog(null,&quot;修改成功&quot;,&quot;提示&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		button.setBounds(82, 282, 114, 27);</span><br><span class="line">		add(button);</span><br><span class="line">		</span><br><span class="line">		JButton button_1 &#x3D; new JButton(&quot;\u91CD\u7F6E&quot;);</span><br><span class="line">		button_1.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				radioButton.setSelected(false);</span><br><span class="line">				radioButton_1.setSelected(false);</span><br><span class="line">				textField.setText(&quot;&quot;);</span><br><span class="line">				textField_1.setText(&quot;&quot;);</span><br><span class="line">				textField_2.setText(&quot;&quot;);</span><br><span class="line">				comboBox.setSelectedIndex(-1);</span><br><span class="line">				comboBox_1.setSelectedIndex(-1);</span><br><span class="line">				JOptionPane.showMessageDialog(null,&quot;重置成功!&quot;,&quot;信息&quot;,JOptionPane.INFORMATION_MESSAGE );</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		button_1.setBounds(204, 282, 114, 27);</span><br><span class="line">		add(button_1);</span><br><span class="line">		</span><br><span class="line">		JButton btnNewButton &#x3D; new JButton(&quot;\u67E5\u8BE2&quot;);</span><br><span class="line">		btnNewButton.setToolTipText(&quot;&quot;);</span><br><span class="line">		btnNewButton.setBounds(364, 15, 79, 27);</span><br><span class="line">		add(btnNewButton);</span><br><span class="line">		btnNewButton.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				 Connection sin&#x3D;Test.getconnectin();</span><br><span class="line">					String sno&#x3D;textField.getText();</span><br><span class="line">					ResultSet rs&#x3D;null;</span><br><span class="line">					PreparedStatement stmt&#x3D;null;</span><br><span class="line">					boolean flag&#x3D;false;</span><br><span class="line">					try &#123;</span><br><span class="line">						&#x2F;&#x2F;牛逼查找</span><br><span class="line">						 stmt&#x3D;sin.prepareStatement(&quot;select * from student where sno&#x3D;?&quot;);</span><br><span class="line">					    stmt.setObject(1,sno);</span><br><span class="line">						rs&#x3D;stmt.executeQuery();</span><br><span class="line">						while(rs.next())&#123;</span><br><span class="line">						String msg&#x3D;rs.getString(&quot;sno&quot;)+&quot;\n&quot;+rs.getString(&quot;name&quot;)+&quot;\n&quot;+rs.getString(&quot;sex&quot;)+&quot;\n&quot;+rs.getString(&quot;department&quot;)+&quot;\n&quot;+rs.getString(&quot;subject&quot;)+&quot;\n&quot;+rs.getString(&quot;myclass&quot;)+&quot;\n&quot;;</span><br><span class="line">						&#x2F;&#x2F;JOptionPane.showMessageDialog(null,msg,&quot;查询结果：&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">						flag&#x3D;true;</span><br><span class="line">						&#x2F;&#x2F;修改</span><br><span class="line">						textField_1.setText(rs.getString(&quot;name&quot;));</span><br><span class="line">						String ssex&#x3D;null;</span><br><span class="line">						ssex&#x3D;rs.getString(&quot;sex&quot;);</span><br><span class="line">						if(ssex.equalsIgnoreCase(&quot;男&quot;)) &#123;</span><br><span class="line">							radioButton.setSelected(true);</span><br><span class="line"></span><br><span class="line">						&#125;else &#123;</span><br><span class="line">							radioButton_1.setSelected(true);</span><br><span class="line">						&#125;</span><br><span class="line">						textField_2.setText(rs.getString(&quot;myclass&quot;));</span><br><span class="line">						comboBox.setSelectedItem(rs.getString(&quot;department&quot;));</span><br><span class="line">						comboBox_1.setSelectedItem(rs.getString(&quot;subject&quot;));</span><br><span class="line">						</span><br><span class="line">						&#125;</span><br><span class="line">						if(flag&#x3D;&#x3D;false) &#123;</span><br><span class="line">							radioButton.setSelected(false);</span><br><span class="line">							radioButton_1.setSelected(false);</span><br><span class="line">							</span><br><span class="line">							textField_1.setText(&quot;&quot;);</span><br><span class="line">							textField_2.setText(&quot;&quot;);</span><br><span class="line">							comboBox.setSelectedIndex(-1);</span><br><span class="line">							comboBox_1.setSelectedIndex(-1);</span><br><span class="line">							JOptionPane.showMessageDialog(null,&quot;查无此人&quot;,&quot;查询结果&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">							</span><br><span class="line">							</span><br><span class="line">						&#125;</span><br><span class="line">					 		stmt.close();&#x2F;&#x2F;关闭数据库</span><br><span class="line">					 		sin.close();</span><br><span class="line">						&#125; catch (SQLException h) &#123;</span><br><span class="line">							&#x2F;&#x2F; TODO Auto-generated catch block</span><br><span class="line">							h.printStackTrace();</span><br><span class="line">						&#125;</span><br><span class="line">					&#125;</span><br><span class="line">			</span><br><span class="line">		&#125;);</span><br><span class="line"></span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<p>查询面板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br></pre></td><td class="code"><pre><span class="line">package 学籍管理系统视窗;</span><br><span class="line"></span><br><span class="line">import javax.swing.JPanel;</span><br><span class="line">import javax.swing.JLabel;</span><br><span class="line">import javax.swing.JOptionPane;</span><br><span class="line">import javax.swing.JTextField;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">import 数据库.Test;</span><br><span class="line"></span><br><span class="line">import javax.swing.JButton;</span><br><span class="line">import java.awt.event.ActionListener;</span><br><span class="line">import java.sql.Connection;</span><br><span class="line">import java.sql.PreparedStatement;</span><br><span class="line">import java.sql.ResultSet;</span><br><span class="line">import java.sql.SQLException;</span><br><span class="line">import java.awt.event.ActionEvent;</span><br><span class="line"></span><br><span class="line">public class 查询面板 extends JPanel &#123;</span><br><span class="line">	private JTextField textField;</span><br><span class="line">	private JTextField textField_1;</span><br><span class="line">	private JTextField textField_2;</span><br><span class="line">	private JTextField textField_3;</span><br><span class="line">	private JTextField textField_4;</span><br><span class="line">	private JTextField textField_5;</span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Create the panel.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public 查询面板() &#123;</span><br><span class="line">		setLayout(null);</span><br><span class="line">		</span><br><span class="line">		JLabel label &#x3D; new JLabel(&quot;\u8F93\u5165\u8981\u67E5\u8BE2\u4FE1\u606F\u7684\u5B66\u53F7\uFF1A&quot;);</span><br><span class="line">		label.setBounds(37, 22, 189, 18);</span><br><span class="line">		add(label);</span><br><span class="line">		</span><br><span class="line">		textField &#x3D; new JTextField();</span><br><span class="line">		textField.setBounds(201, 19, 154, 24);</span><br><span class="line">		add(textField);</span><br><span class="line">		textField.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_1 &#x3D; new JLabel(&quot;\u59D3\u540D&quot;);</span><br><span class="line">		label_1.setBounds(72, 60, 40, 18);</span><br><span class="line">		add(label_1);</span><br><span class="line">		</span><br><span class="line">		textField_1 &#x3D; new JTextField();</span><br><span class="line">		textField_1.setEnabled(false);</span><br><span class="line">		textField_1.setBounds(112, 60, 150, 24);</span><br><span class="line">		add(textField_1);</span><br><span class="line">		textField_1.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_2 &#x3D; new JLabel(&quot;\u6027\u522B&quot;);</span><br><span class="line">		label_2.setBounds(72, 100, 52, 18);</span><br><span class="line">		add(label_2);</span><br><span class="line">		</span><br><span class="line">		textField_2 &#x3D; new JTextField();</span><br><span class="line">		textField_2.setEnabled(false);</span><br><span class="line">		textField_2.setBounds(112, 100, 150, 24);</span><br><span class="line">		add(textField_2);</span><br><span class="line">		textField_2.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_3 &#x3D; new JLabel(&quot;\u5B66\u9662&quot;);</span><br><span class="line">		label_3.setBounds(72, 140, 41, 18);</span><br><span class="line">		add(label_3);</span><br><span class="line">		</span><br><span class="line">		textField_3 &#x3D; new JTextField();</span><br><span class="line">		textField_3.setEnabled(false);</span><br><span class="line">		textField_3.setBounds(112, 140, 150, 24);</span><br><span class="line">		add(textField_3);</span><br><span class="line">		textField_3.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_4 &#x3D; new JLabel(&quot;\u4E13\u4E1A&quot;);</span><br><span class="line">		label_4.setBounds(72, 180, 45, 18);</span><br><span class="line">		add(label_4);</span><br><span class="line">		</span><br><span class="line">		textField_4 &#x3D; new JTextField();</span><br><span class="line">		textField_4.setEnabled(false);</span><br><span class="line">		textField_4.setBounds(112, 180, 150, 24);</span><br><span class="line">		add(textField_4);</span><br><span class="line">		textField_4.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_5 &#x3D; new JLabel(&quot;\u73ED\u7EA7&quot;);</span><br><span class="line">		label_5.setBounds(72, 220, 45, 18);</span><br><span class="line">		add(label_5);</span><br><span class="line">		</span><br><span class="line">		textField_5 &#x3D; new JTextField();</span><br><span class="line">		textField_5.setEnabled(false);</span><br><span class="line">		textField_5.setBounds(112, 220, 150, 24);</span><br><span class="line">		add(textField_5);</span><br><span class="line">		textField_5.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JButton btnNewButton &#x3D; new JButton(&quot;\u67E5\u8BE2&quot;);</span><br><span class="line">		btnNewButton.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				 Connection sin&#x3D;Test.getconnectin();</span><br><span class="line">					String sno&#x3D;textField.getText();</span><br><span class="line">					ResultSet rs&#x3D;null;</span><br><span class="line">					PreparedStatement stmt&#x3D;null;</span><br><span class="line">					try &#123;</span><br><span class="line">						&#x2F;&#x2F;牛逼查找</span><br><span class="line">						 stmt&#x3D;sin.prepareStatement(&quot;select * from student where sno&#x3D;?&quot;);</span><br><span class="line">					    stmt.setObject(1,sno);</span><br><span class="line">						rs&#x3D;stmt.executeQuery();</span><br><span class="line">						boolean flag&#x3D;false;</span><br><span class="line">						while(rs.next())&#123;</span><br><span class="line">						String msg&#x3D;rs.getString(&quot;sno&quot;)+&quot;\n&quot;+rs.getString(&quot;name&quot;)+&quot;\n&quot;+rs.getString(&quot;sex&quot;)+&quot;\n&quot;+rs.getString(&quot;department&quot;)+&quot;\n&quot;+rs.getString(&quot;subject&quot;)+&quot;\n&quot;+rs.getString(&quot;myclass&quot;)+&quot;\n&quot;;</span><br><span class="line">						JOptionPane.showMessageDialog(null,msg,&quot;查询结果：&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">						textField_1.setText(rs.getString(&quot;name&quot;));</span><br><span class="line">						textField_2.setText(rs.getString(&quot;sex&quot;));</span><br><span class="line">						textField_3.setText(rs.getString(&quot;department&quot;));</span><br><span class="line">						textField_4.setText(rs.getString(&quot;subject&quot;));</span><br><span class="line">						textField_5.setText(rs.getString(&quot;myclass&quot;));</span><br><span class="line">						flag&#x3D;true;</span><br><span class="line">						&#125;</span><br><span class="line">						if(flag&#x3D;&#x3D;false) &#123;</span><br><span class="line">							JOptionPane.showMessageDialog(null,&quot;查无此人&quot;,&quot;查询结果&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">						&#125;</span><br><span class="line">						</span><br><span class="line">					 		stmt.close();&#x2F;&#x2F;关闭数据库</span><br><span class="line">					 		sin.close();</span><br><span class="line">						&#125; catch (SQLException h) &#123;</span><br><span class="line">							&#x2F;&#x2F; TODO Auto-generated catch block</span><br><span class="line">							h.printStackTrace();</span><br><span class="line">						&#125;</span><br><span class="line">					&#125;</span><br><span class="line">				</span><br><span class="line">					</span><br><span class="line">			</span><br><span class="line">			   </span><br><span class="line">			 </span><br><span class="line">		   </span><br><span class="line"></span><br><span class="line">			</span><br><span class="line">		&#125;);</span><br><span class="line">		btnNewButton.setBounds(366, 17, 77, 27);</span><br><span class="line">		add(btnNewButton);</span><br><span class="line"></span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<p>删除面板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br></pre></td><td class="code"><pre><span class="line">package 学籍管理系统视窗;</span><br><span class="line"></span><br><span class="line">import java.awt.event.ActionEvent;</span><br><span class="line">import java.awt.event.ActionListener;</span><br><span class="line">import java.sql.Connection;</span><br><span class="line">import java.sql.PreparedStatement;</span><br><span class="line">import java.sql.ResultSet;</span><br><span class="line">import java.sql.SQLException;</span><br><span class="line"></span><br><span class="line">import javax.swing.JButton;</span><br><span class="line">import javax.swing.JLabel;</span><br><span class="line">import javax.swing.JOptionPane;</span><br><span class="line">import javax.swing.JPanel;</span><br><span class="line">import javax.swing.JTextField;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">import 数据库.Test;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">public class 删除面板 extends JPanel &#123;</span><br><span class="line">	private JTextField textField;</span><br><span class="line">	private JTextField textField_1;</span><br><span class="line">	private JTextField textField_2;</span><br><span class="line">	private JTextField textField_3;</span><br><span class="line">	private JTextField textField_4;</span><br><span class="line">	private JTextField textField_5;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">	&#x2F;**</span><br><span class="line">	 * Create the panel.</span><br><span class="line">	 *&#x2F;</span><br><span class="line">	public 删除面板() &#123;</span><br><span class="line">setLayout(null);</span><br><span class="line">		</span><br><span class="line">		JLabel label &#x3D; new JLabel(&quot;\u8F93\u5165\u8981\u5220\u9664\u4FE1\u606F\u7684\u5B66\u53F7\uFF1A&quot;);</span><br><span class="line">		label.setBounds(37, 22, 189, 18);</span><br><span class="line">		add(label);</span><br><span class="line">		</span><br><span class="line">		textField &#x3D; new JTextField();</span><br><span class="line">		textField.setBounds(201, 19, 154, 24);</span><br><span class="line">		add(textField);</span><br><span class="line">		textField.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_1 &#x3D; new JLabel(&quot;\u59D3\u540D&quot;);</span><br><span class="line">		label_1.setBounds(72, 60, 40, 18);</span><br><span class="line">		add(label_1);</span><br><span class="line">		</span><br><span class="line">		textField_1 &#x3D; new JTextField();</span><br><span class="line">		textField_1.setEnabled(false);</span><br><span class="line">		textField_1.setBounds(112, 60, 150, 24);</span><br><span class="line">		add(textField_1);</span><br><span class="line">		textField_1.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_2 &#x3D; new JLabel(&quot;\u6027\u522B&quot;);</span><br><span class="line">		label_2.setBounds(72, 100, 52, 18);</span><br><span class="line">		add(label_2);</span><br><span class="line">		</span><br><span class="line">		textField_2 &#x3D; new JTextField();</span><br><span class="line">		textField_2.setEnabled(false);</span><br><span class="line">		textField_2.setBounds(112, 100, 150, 24);</span><br><span class="line">		add(textField_2);</span><br><span class="line">		textField_2.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_3 &#x3D; new JLabel(&quot;\u5B66\u9662&quot;);</span><br><span class="line">		label_3.setBounds(72, 140, 41, 18);</span><br><span class="line">		add(label_3);</span><br><span class="line">		</span><br><span class="line">		textField_3 &#x3D; new JTextField();</span><br><span class="line">		textField_3.setEnabled(false);</span><br><span class="line">		textField_3.setBounds(112, 140, 150, 24);</span><br><span class="line">		add(textField_3);</span><br><span class="line">		textField_3.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_4 &#x3D; new JLabel(&quot;\u4E13\u4E1A&quot;);</span><br><span class="line">		label_4.setBounds(72, 180, 45, 18);</span><br><span class="line">		add(label_4);</span><br><span class="line">		</span><br><span class="line">		textField_4 &#x3D; new JTextField();</span><br><span class="line">		textField_4.setEnabled(false);</span><br><span class="line">		textField_4.setBounds(112, 180, 150, 24);</span><br><span class="line">		add(textField_4);</span><br><span class="line">		textField_4.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JLabel label_5 &#x3D; new JLabel(&quot;\u73ED\u7EA7&quot;);</span><br><span class="line">		label_5.setBounds(72, 220, 45, 18);</span><br><span class="line">		add(label_5);</span><br><span class="line">		</span><br><span class="line">		textField_5 &#x3D; new JTextField();</span><br><span class="line">		textField_5.setEnabled(false);</span><br><span class="line">		textField_5.setBounds(112, 220, 150, 24);</span><br><span class="line">		add(textField_5);</span><br><span class="line">		textField_5.setColumns(10);</span><br><span class="line">		</span><br><span class="line">		JButton btnNewButton &#x3D; new JButton(&quot;\u67E5\u8BE2&quot;);</span><br><span class="line">		btnNewButton.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				 Connection sin&#x3D;Test.getconnectin();</span><br><span class="line">					String sno&#x3D;textField.getText();</span><br><span class="line">					ResultSet rs&#x3D;null;</span><br><span class="line">					PreparedStatement stmt&#x3D;null;</span><br><span class="line">					try &#123;</span><br><span class="line">						&#x2F;&#x2F;牛逼查找</span><br><span class="line">						 stmt&#x3D;sin.prepareStatement(&quot;select * from student where sno&#x3D;?&quot;);</span><br><span class="line">					    stmt.setObject(1,sno);</span><br><span class="line">						rs&#x3D;stmt.executeQuery();</span><br><span class="line">						boolean flag&#x3D;false;</span><br><span class="line">						while(rs.next())&#123;</span><br><span class="line">							JOptionPane.showMessageDialog(null,&quot;查询成功&quot;,&quot;提示&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">						textField_1.setText(rs.getString(&quot;name&quot;));</span><br><span class="line">						textField_2.setText(rs.getString(&quot;sex&quot;));</span><br><span class="line">						textField_3.setText(rs.getString(&quot;department&quot;));</span><br><span class="line">						textField_4.setText(rs.getString(&quot;subject&quot;));</span><br><span class="line">						textField_5.setText(rs.getString(&quot;myclass&quot;));</span><br><span class="line">						flag&#x3D;true;</span><br><span class="line">						&#125;</span><br><span class="line">						if(flag&#x3D;&#x3D;false) &#123;</span><br><span class="line">							JOptionPane.showMessageDialog(null,&quot;查无此人&quot;,&quot;查询结果&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">						&#125;</span><br><span class="line">					 		stmt.close();&#x2F;&#x2F;关闭数据库</span><br><span class="line">					 		sin.close();</span><br><span class="line">						&#125; catch (SQLException h) &#123;</span><br><span class="line">							&#x2F;&#x2F; TODO Auto-generated catch block</span><br><span class="line">							h.printStackTrace();</span><br><span class="line">						&#125;</span><br><span class="line">					&#125;</span><br><span class="line">				</span><br><span class="line">					</span><br><span class="line">			</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">				</span><br><span class="line">			</span><br><span class="line">		&#125;);</span><br><span class="line">		btnNewButton.setBounds(366, 17, 77, 27);</span><br><span class="line">		add(btnNewButton);</span><br><span class="line">		</span><br><span class="line">		JButton button &#x3D; new JButton(&quot;\u5220\u9664&quot;);</span><br><span class="line">		button.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				&#x2F;&#x2F;删除操作</span><br><span class="line">				String sno&#x3D;textField.getText();</span><br><span class="line">				boolean flag;</span><br><span class="line">				Connection sin&#x3D;Test.getconnectin();</span><br><span class="line">				flag&#x3D;Test.chongfu(sin,sno);</span><br><span class="line">				System.out.println(flag);</span><br><span class="line">				if(flag) &#123;</span><br><span class="line">				</span><br><span class="line">				Test.delete(sin, sno);</span><br><span class="line">				JOptionPane.showMessageDialog(null,&quot;信息删除成功!&quot;,&quot;信息&quot;,JOptionPane.INFORMATION_MESSAGE );</span><br><span class="line">				textField.setText(&quot;&quot;);</span><br><span class="line">				textField_1.setText(&quot;&quot;);</span><br><span class="line">				textField_2.setText(&quot;&quot;);</span><br><span class="line">				textField_3.setText(&quot;&quot;);</span><br><span class="line">				textField_4.setText(&quot;&quot;);</span><br><span class="line">				textField_5.setText(&quot;&quot;);</span><br><span class="line">			&#125;</span><br><span class="line">				else</span><br><span class="line">					JOptionPane.showMessageDialog(null,&quot;该学号信息不存在!&quot;,&quot;信息&quot;,JOptionPane.INFORMATION_MESSAGE );</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		button.setBounds(72, 257, 113, 27);</span><br><span class="line">		add(button);</span><br><span class="line">		</span><br><span class="line">		JButton button_1 &#x3D; new JButton(&quot;\u91CD\u7F6E&quot;);</span><br><span class="line">		button_1.addActionListener(new ActionListener() &#123;</span><br><span class="line">			public void actionPerformed(ActionEvent e) &#123;</span><br><span class="line">				</span><br><span class="line">				textField.setText(&quot;&quot;);</span><br><span class="line">				textField_1.setText(&quot;&quot;);</span><br><span class="line">				textField_2.setText(&quot;&quot;);</span><br><span class="line">				textField_3.setText(&quot;&quot;);</span><br><span class="line">				textField_4.setText(&quot;&quot;);</span><br><span class="line">				textField_5.setText(&quot;&quot;);</span><br><span class="line">				JOptionPane.showMessageDialog(null,&quot;重置成功&quot;,&quot;提示&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">				</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;);</span><br><span class="line">		button_1.setBounds(217, 257, 113, 27);</span><br><span class="line">		add(button_1);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<hr>
<p>数据库类</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br></pre></td><td class="code"><pre><span class="line">package 数据库;</span><br><span class="line"></span><br><span class="line">import java.sql.*;</span><br><span class="line"></span><br><span class="line">import javax.swing.JOptionPane;</span><br><span class="line">public class Test &#123;</span><br><span class="line">public final static Connection getconnectin()&#123;</span><br><span class="line">	 </span><br><span class="line">	Connection con&#x3D;null;</span><br><span class="line">	&#x2F;&#x2F;String driver &#x3D; &quot;com.mysql.jdbc.Driver&quot;; 8.0不需要加载驱动</span><br><span class="line">	String url &#x3D; &quot;jdbc:mysql:&#x2F;&#x2F;localhost:3306&#x2F;gip?useUnicode&#x3D;true&amp;characterEncoding&#x3D;UTF8&amp;useSSL&#x3D;false&amp;serverTimezone&#x3D;Asia&#x2F;Shanghai&quot;;</span><br><span class="line">    String user &#x3D; &quot;root&quot;;</span><br><span class="line">	String password &#x3D; &quot;123456&quot;;</span><br><span class="line">	try&#123;</span><br><span class="line">		&#x2F;&#x2F;Class.forName(&quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;);</span><br><span class="line">	&#x2F;&#x2F;	Class.forName(driver);</span><br><span class="line">	    con&#x3D;DriverManager.getConnection(url,user,password);</span><br><span class="line">		con.setCatalog(&quot;gip&quot;);</span><br><span class="line">		</span><br><span class="line">	&#125;</span><br><span class="line">	catch(SQLException sqle)&#123;</span><br><span class="line">	       System.out.println(sqle+&quot;lianjiecuowu&quot;);</span><br><span class="line">	            &#125;</span><br><span class="line">	    	catch(Exception e)&#123;</span><br><span class="line">	    		System.out.println(e+&quot;diergecuowu&quot;);</span><br><span class="line">	    	</span><br><span class="line">	    	&#125;</span><br><span class="line">	return con;</span><br><span class="line">&#125;</span><br><span class="line">&#x2F;&#x2F;添加数据</span><br><span class="line">public final static void insert(Connection con,Object obj[])&#123;</span><br><span class="line">	PreparedStatement stmt&#x3D;null;</span><br><span class="line">	</span><br><span class="line">	try &#123;</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">	stmt&#x3D;con.prepareStatement(&quot;insert into student(sno,name,sex,department,subject,myclass) values(?,?,?,?,?,?)&quot;);</span><br><span class="line">		</span><br><span class="line">		stmt.setString(1,obj[0].toString());</span><br><span class="line">		stmt.setString(2,obj[1].toString());</span><br><span class="line">		stmt.setString(3,obj[2].toString());</span><br><span class="line">		stmt.setString(4,obj[3].toString());</span><br><span class="line">		stmt.setString(5,obj[4].toString());</span><br><span class="line">		stmt.setString(6,obj[5].toString());</span><br><span class="line">		stmt.execute();</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">	&#125; catch (SQLException e) &#123;</span><br><span class="line">		JOptionPane.showMessageDialog(null,&quot;shibai&quot;,&quot;操作提示&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line">&#x2F;&#x2F;查询数据</span><br><span class="line">public final static ResultSet query(Connection con)&#123;</span><br><span class="line">	</span><br><span class="line">	ResultSet rs&#x3D;null;</span><br><span class="line">	PreparedStatement stmt&#x3D;null;</span><br><span class="line">	try &#123;</span><br><span class="line">		stmt&#x3D;con.prepareStatement(&quot;select * from student&quot;);</span><br><span class="line">		 rs&#x3D;stmt.executeQuery();</span><br><span class="line"> 		&#x2F;&#x2F;stmt.close();</span><br><span class="line"> 		&#x2F;&#x2F;con.close();</span><br><span class="line">	&#125; catch (SQLException e) &#123;</span><br><span class="line">		&#x2F;&#x2F; TODO Auto-generated catch block</span><br><span class="line">		e.printStackTrace();</span><br><span class="line">	&#125;</span><br><span class="line">	return rs;</span><br><span class="line">&#125;</span><br><span class="line">&#x2F;&#x2F;判断学号重复</span><br><span class="line">public final static boolean chongfu(Connection con,String a)&#123;</span><br><span class="line">	</span><br><span class="line">	ResultSet rs&#x3D;null;</span><br><span class="line">	PreparedStatement stmt&#x3D;null;</span><br><span class="line">	boolean flag&#x3D;true;;</span><br><span class="line">	try &#123;</span><br><span class="line">		stmt&#x3D;con.prepareStatement(&quot;select sno from student&quot;);</span><br><span class="line">		 rs&#x3D;stmt.executeQuery();</span><br><span class="line">		 while(rs.next())</span><br><span class="line">		 &#123;</span><br><span class="line">			 if(a.equalsIgnoreCase(rs.getString(&quot;sno&quot;)))</span><br><span class="line">			</span><br><span class="line">				 return true;</span><br><span class="line">			</span><br><span class="line">			 &#x2F;&#x2F;System.out.println(rs.getString(&quot;sno&quot;));</span><br><span class="line">		 &#125;</span><br><span class="line"> 		&#x2F;&#x2F;stmt.close();</span><br><span class="line"> 		&#x2F;&#x2F;con.close();</span><br><span class="line">		 </span><br><span class="line">		 </span><br><span class="line">		 </span><br><span class="line">	&#125; catch (SQLException e) &#123;</span><br><span class="line">		&#x2F;&#x2F; TODO Auto-generated catch block</span><br><span class="line">		e.printStackTrace();</span><br><span class="line">	&#125;</span><br><span class="line">	return false;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;删除数据</span><br><span class="line">public final static void delete(Connection con,String s)&#123;</span><br><span class="line">	try &#123;</span><br><span class="line">		PreparedStatement stmt;</span><br><span class="line">		 stmt&#x3D;con.prepareStatement(&quot;delete from student where sno&#x3D;?&quot;);</span><br><span class="line">	    stmt.setObject(1,s);</span><br><span class="line">		stmt.execute();</span><br><span class="line">		</span><br><span class="line">	&#125; catch (SQLException e) &#123;</span><br><span class="line">		&#x2F;&#x2F; TODO Auto-generated catch block</span><br><span class="line">		e.printStackTrace();</span><br><span class="line">	&#125;</span><br><span class="line">	finally&#123;</span><br><span class="line">		</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;更新修改数据</span><br><span class="line">public final static void update(Connection con,Object obj[])&#123;</span><br><span class="line">	PreparedStatement stmt&#x3D;null;</span><br><span class="line">	try &#123;</span><br><span class="line">		stmt&#x3D;con.prepareStatement(&quot;update student set name&#x3D;?,sex&#x3D;?,department&#x3D;?,subject&#x3D;?,myclass&#x3D;? where sno&#x3D;?&quot;);</span><br><span class="line">		</span><br><span class="line">		stmt.setString(6,obj[0].toString());</span><br><span class="line">		stmt.setString(1,obj[1].toString());</span><br><span class="line">		stmt.setString(2,obj[2].toString());</span><br><span class="line">		stmt.setString(3,obj[3].toString());</span><br><span class="line">		stmt.setString(4,obj[4].toString());</span><br><span class="line">		stmt.setString(5,obj[5].toString());</span><br><span class="line">		stmt.execute();</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">		</span><br><span class="line">	&#125; catch (SQLException e) &#123;</span><br><span class="line">		JOptionPane.showMessageDialog(null,&quot;shibai&quot;,&quot;操作提示&quot;,JOptionPane.NO_OPTION );</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
    </div>

    
    
    
        <div class="reward-container">
  <div>坚持原创技术分享，您的支持将鼓励我继续分享！</div>
  <button onclick="var qr = document.getElementById('qr'); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
      
      <div style="display: inline-block;">
        <img src="/images/wechatpay.png" alt="Gip886 微信支付">
        <p>微信支付</p>
      </div>

  </div>
</div>


      <footer class="post-footer">

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2020/07/11/%E5%A4%A7%E5%AD%A6%E5%BF%A0%E5%91%8A/" rel="prev" title="大学忠告">
      <i class="fa fa-chevron-left"></i> 大学忠告
    </a></div>
      <div class="post-nav-item">
    <a href="/2020/07/11/%E5%AD%A6%E4%B9%A0Git%E7%9A%84%E4%BD%BF%E7%94%A8/" rel="next" title="学习Git的使用">
      学习Git的使用 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Gip886"
      src="/images/%E5%A4%B4%E5%83%8F.jpg">
  <p class="site-author-name" itemprop="name">Gip886</p>
  <div class="site-description" itemprop="description">为了更美好的明天而战</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">29</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/Gip886" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;Gip886" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>



      </div>
        <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=300 height=86 src="//music.163.com/outchain/player?type=2&id=492390949&auto=1&height=66"></iframe>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Gip886</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
      <span class="post-meta-item-text">站点总字数：</span>
    <span title="站点总字数">153k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span class="post-meta-item-text">站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">2:19</span>
</div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script size="300" alpha="0.6" zIndex="-1" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
  <script src="/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>


  <script defer src="/lib/three/three.min.js"></script>
    <script defer src="/lib/three/canvas_lines.min.js"></script>


  




  
<script src="/js/local-search.js"></script>













  

  

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","model":{"jsonPath":"/live2dw/assets/koharu.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true},"log":false,"tagMode":false});</script></body>
<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/clicklove.js"></script>
</html>

